<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">
    <title>协同平台商脉圈运营者管理系统-编辑供应商品</title>

    <!--CSS-->
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="css/animate.css">
    <link rel="stylesheet" type="text/css" href="css/base.css">

    <!-- HTML5 shim and Respond.js for IE8 support HTML5 elements and media queries-->
    <!--[if lt IE 9]>
    <script src="js/libs/html5shiv.min.js"></script>
    <script src="js/libs/respond.min.js"></script>
    <![endif]-->
</head>

<body class="overflow-x-h">
<div class="container animated fadeInRight">

    <!--breadcrumb-->
    <ol class="breadcrumb">
        <li>商品管理</li>
        <li>供应商品</li>
        <li>编辑供应商品</li>
    </ol>

    <form role="form" class="supply-goods-add edit-box" data-validator-option="{timely:1, theme:'yellow_top'}">
        <div class="form-group mode">
            <label class="control-label">选择模式：</label>
            <div class="pull-left">
                <label class="front-show"><input type="radio" name="mode" value="1" checked> 商品详情</label>
                <label class="front-show"><input type="radio" name="mode" value="0"> 跳转直播平台</label>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="col-lg-3 col-sm-3">
            <div class="form-group clearfix">
                <label class="control-label">商品名称：</label>
                <input type="text" class="form-control" value="商品名称" data-rule="required;"/>
            </div>
        </div>
        <div class="col-lg-3 col-sm-3">
            <div class="form-group clearfix">
                <label class="control-label">一级分类：</label>
                <select class="select-wrap form-control">
                    <option value="">一级分类一级分类一级分类一级分类一级分类一级分类一级分类一级分类一级分类一级分类一级分类一级分类一级分类一级分类一级分类一级分类</option>
                    <option value="">一级分类</option>
                    <option value="">一级分类</option>
                    <option value="">一级分类</option>
                </select>
            </div>
        </div>
        <div class="col-lg-3 col-sm-3">
            <div class="form-group clearfix">
                <label class="control-label">二级分类：</label>
                <select class="select-wrap form-control">
                    <option value="">二级分类二级分类二级分类二级分类二级分类二级分类二级分类二级分类</option>
                    <option value="">二级分类</option>
                    <option value="">二级分类</option>
                    <option value="">二级分类</option>
                </select>
            </div>
        </div>
        <div class="col-lg-3 col-sm-3">
            <div class="form-group clearfix">
                <label class="control-label">报价：</label>
                <input type="text" class="form-control" value="报价" data-rule="required;"/>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="col-lg-3">
            <div class="form-group clearfix">
                <label class="control-label">品牌：</label>
                <input type="text" class="form-control" value="品牌" data-rule="required;"/>
            </div>
        </div>
        <div class="col-lg-3 col-sm-3">
            <div class="form-group clearfix">
                <label class="control-label">厂商：</label>
                <input type="text" class="form-control" value="厂商" data-rule="required;"/>
            </div>
        </div>
        <div class="col-lg-3 col-sm-3">
            <div class="form-group clearfix">
                <label class="control-label">产地：</label>
                <input type="text" class="form-control" value="产地" data-rule="required;"/>
            </div>
        </div>
        <div class="col-lg-3 col-sm-3">
            <div class="form-group clearfix">
                <label class="control-label">商品链接：</label>
                <input type="text" class="form-control" value="商品链接" data-rule="required;"/>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="form-group goods-main-pic">
            <label class="control-label">商品主图：</label>
            <div class="img-box" data-ride="imagePrev">
                <div class="local-img"><img class="prev" src="images/base/goods.jpg" /> </div>
                <div class="btn-file">
                    <i class="fa fa-plus"></i>
                    <input name="img" type="file" class="upload" accept="image/*"/>
                </div>
                <i class="fa fa-trash clear-img"></i>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="form-group goods-auxiliary-pic">
            <label class="control-label">商品配图：</label>
            <div class="img-box" data-ride="imagePrev">
                <div class="local-img"><img class="prev" src="images/base/goods.jpg" /> </div>
                <div class="btn-file">
                    <i class="fa fa-plus"></i>
                    <input name="img" type="file" class="upload" accept="image/*"/>
                </div>
                <i class="fa fa-trash clear-img"></i>
            </div>
            <div class="img-box" data-ride="imagePrev">
                <div class="local-img"><img class="prev" src="images/base/goods.jpg" /> </div>
                <div class="btn-file">
                    <i class="fa fa-plus"></i>
                    <input name="img" type="file" class="upload" accept="image/*"/>
                </div>
                <i class="fa fa-trash clear-img"></i>
            </div>
            <button type="button" class="btn btn-primary btn-add">图片追加</button>
            <div class="clearfix"></div>
        </div>
        <div class="form-group clearfix">
            <label class="control-label">商品详情：</label>
            <div class="textarea-box pull-left">
                <textarea id="textarea-con" class="form-control" data-rule="required;">商品详情商品详情商品详情商品详情商品详情</textarea>
                <p id="text-count"><span id="currentNum"></span></p>
            </div>
        </div>
        <div class="form-group mode">
            <label class="control-label">发布状态：</label>
            <div class="pull-left">
                <label class="front-show"><input type="radio" name="isShow" value="1" checked> 显示</label>
                <label class="front-show"><input type="radio" name="isShow" value="0"> 不显示</label>
            </div>
        </div>
        <div class="btn-wrap">
            <button type="button" class="btn btn-cancel">取消</button>
            <button type="submit" class="btn btn-confirm">确认</button>
        </div>
    </form>
</div>

<!--modal-->
<div class="modal fade alert-modal" id="tip">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body">
                <p class="text-center">最多添加四张配图！</p>
            </div>
        </div>
    </div>
</div>

<script src="js/libs/jquery-1.12.1.min.js"></script>
<script src="js/libs/bootstrap.min.js"></script>
<script src="js/libs/slimscroll.min.js"></script>
<script src="js/libs/jquery-imagePreview.js"></script>
<script src="js/validator/jquery.validator.min.js?local=zh-CN"></script>
<script src="js/base.js"></script>
<script src="js/textareaNum.js"></script>
<script type="text/javascript">
    $(function() {

        //三个参数textarea的id,要输出字数统计的p的id,和字数限制数量
        startMonitor('textarea-con', 'text-count',500);

        //追加图片
        var imgNum = $('.goods-auxiliary-pic .img-box').length;
        $('.btn-add').click(function(){
            imgNum ++;
            if(imgNum < 5 ){
                var appendHtml= '<div class="img-box" data-ride="imagePrev"> ' +
                        '<div class="local-img"><img class="prev" src="images/base/noPic.png" /> </div> ' +
                        '<div class="btn-file"> <i class="fa fa-plus"></i> ' +
                        '<input name="img" type="file" class="upload" accept="image/*"/> </div> ' +
                        '<i class="fa fa-trash clear-img"></i> ' +
                        '</div>';
                $('.img-box:last').after(appendHtml);
            }else{
                $('#tip').modal('show');
            }
        });
        //图片上传并预览
        $('.goods-auxiliary-pic').on('click','.img-box',function(){
            $(this).imagePreview();
        });
    });
</script>
</body>
</html>